home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cocktail / docme.lha / doc.me / ooags.me < prev    next >
Text File  |  1992-09-25  |  39KB  |  1,220 lines

  1. .\" use: pic | tbl | eqn | ditroff -me
  2. .\"
  3. .\"    "@(#)bibmac.me    2.2    9/9/83";
  4. .de IP
  5. .ip \\$1 \\$2
  6. ..
  7. .de LP
  8. .lp
  9. ..
  10. .\"    @(#)bmac.std    2.2    9/9/83;
  11. .\" standard format troff commands
  12. .\" citation formatting strings
  13. .ds [[ [
  14. .ds ]] ]
  15. .ds ], ,\|
  16. .ds ]- -
  17. .ds [. " \&
  18. .ds .] .
  19. .ds [, " \&
  20. .ds ,] ,
  21. .ds [? " \&
  22. .ds ?] ?
  23. .ds [: " \&
  24. .ds :] :
  25. .ds [; " \&
  26. .ds ;] ;
  27. .ds [! " \&
  28. .ds !] !
  29. .ds [" " \&
  30. .ds "] \&"
  31. .ds [' " \&
  32. .ds '] '
  33. .ds [< " \&
  34. .ds >]
  35. .\" reference formmating strings
  36. .ds a] " \&
  37. .ds b] , \&
  38. .ds c] , \&
  39. .ds n] "\& and \&
  40. .ds m] "\& and \&
  41. .ds p] .
  42. .\" reference formmating macros
  43. .de s[   \" start reference
  44. .nh
  45. .IP [\\*([F] 5m
  46. ..
  47. .de e[   \" end reference
  48. .[-
  49. ..
  50. .de []   \" start to display collected references
  51. .LP
  52. ..
  53. .de ][   \" choose format
  54. .ie !"\\*([J"" \{\
  55. .    ie !"\\*([V"" .nr t[ 1    \" journal
  56. .    el            .nr t[ 5    \" conference paper
  57. .\}
  58. .el .ie !"\\*([B"" .nr t[ 3    \" article in book
  59. .el .ie !"\\*([R"" .nr t[ 4    \" technical report
  60. .el .ie !"\\*([I"" .nr t[ 2    \" book
  61. .el                .nr t[ 0    \" other
  62. .\\n(t[[
  63. ..
  64. .de 0[   \" other
  65. .s[
  66. .if !"\\*([A"" \\*([A\\c
  67. .if !"\\*([T"" , \\*([T\\c
  68. .if !"\\*([V"" , Vol. \\*([V\\c
  69. .if !"\\*([O"" , \\*([O\\c
  70. .if !"\\*([D"" , \\*([D\\c
  71. \&.
  72. .e[
  73. ..
  74. .de 1[ \" journal article
  75. .s[
  76. .if !"\\*([A"" \\*([A,
  77. .if !"\\*([T""  \\*([T,
  78. \\fI\\*([J \\*([V\\fP\c
  79. .if !"\\*([N"" ,\\*([N
  80. .if !"\\*([D"" (\\*([D)\c
  81. .if !"\\*([P"" , \\*([P\c
  82. .if !"\\*([I"" , \\*([I\c
  83. \\&.
  84. .if !"\\*([O"" \\*([O.
  85. .e[
  86. ..
  87. .de 2[ \" book
  88. .s[
  89. .ie !"\\*([A"" \\*([A,
  90. .el .if !"\\*([E"" \{\
  91. .       ie \\n([E-1 \\*([E, eds.,
  92. .       el \\*([E, ed.,\}
  93. .if !"\\*([T"" \\fI\\*([T\\fP,
  94. .rm a[
  95. .if !"\\*([I"" .ds a[ \\*([I
  96. .if !"\\*([C"" \{\
  97. .       if !"\\*(a["" .as a[ , \\&
  98. .       as a[ \\*([C\}
  99. .if !"\\*([D"" \{\
  100. .       if !"\\*(a["" .as a[ , \\&
  101. .       as a[ \\*([D\}
  102. \\*(a[.
  103. .if !"\\*([G"" Gov. ordering no. \\*([G.
  104. .if !"\\*([O"" \\*([O.
  105. .e[
  106. ..
  107. .de 3[ \" article in book
  108. .s[
  109. .if !"\\*([A"" \\*([A,
  110. .if !"\\*([T"" \\*([T,
  111. in \\fI\\*([B\\fP\c
  112. .if !"\\*([V"" , vol. \\*([V
  113. .if !~\\*([E~~ \{\
  114. .       ie , \\n([E-1  \\*([E (editors)\c
  115. .       el , \\*([E (editor)\c\}
  116. .if !"\\*([I"" , \\*([I\c
  117. .if !"\\*([C"" , \\*([C\c
  118. .if !"\\*([D"" , \\*([D\c
  119. .if !"\\*([P"" , \\*([P\c
  120. \\&.
  121. .if !"\\*([O"" \\*([O.
  122. .e[
  123. ..
  124. .de 4[ \" report
  125. .s[
  126. .if !"\\*([A"" \\*([A,
  127. .if !~\\*([E~~ \{\
  128. .       ie \\n([E-1 \\*([E, editors.
  129. .       el \\*([E, editor.\}
  130. \\*([T,
  131. \\*([R\c
  132. .if !"\\*([G"" \& (\\*([G)\c
  133. .if !"\\*([I"" , \\*([I\c
  134. .if !"\\*([C"" , \\*([C\c
  135. .if !"\\*([D"" , \\*([D\c
  136. \\&.
  137. .if !"\\*([O"" \\*([O.
  138. .e[
  139. ..
  140. .de 5[ \" conference paper
  141. .s[
  142. .if !"\\*([A"" \\*([A,
  143. .if !"\\*([T"" \\*([T,
  144. \\fI\\*([J\\fP,
  145. .if !"\\*([C"" \\*([C,
  146. .if !"\\*([D"" \\*([D\c
  147. .if !"\\*([P"" , \\*([P\c
  148. \\&.
  149. .if !"\\*([O"" \\*([O.
  150. .e[
  151. ..
  152. .de [-   \" clean up after yourself
  153. .rm [A [B [C [D
  154. .rm [E [F [G
  155. .rm [I [J [K
  156. .rm [N [O [P
  157. .rm [R [T
  158. .rm [V [W
  159. ..
  160. .\"    @(#)bmac.std    2.2    8/24/83;
  161. .\" standard format troff commands
  162. .\" citation formatting strings
  163. .ds [[ [
  164. .ds ]] ]
  165. .ds ], ,\|
  166. .ds ]- -
  167. .ds [. " \&
  168. .ds .] .
  169. .ds [, " \&
  170. .ds ,] ,
  171. .ds [< " \&
  172. .ds >]
  173. .\" reference formmating strings
  174. .ds c] , \&
  175. .ds n] "" and \&
  176. .ds m] "" and \&
  177. .ds a] " \&
  178. .\" reference formmating macros
  179. .de s[   \" start reference
  180. .nh
  181. .IP [\\*([F] 5m
  182. ..
  183. .de e[   \" end reference
  184. .[-
  185. ..
  186. .de []   \" start to display collected references
  187. .SH
  188. References
  189. .LP
  190. ..
  191. .de ][   \" choose format
  192. .ie !"\\*([J"" \{\
  193. .    ie !"\\*([V"" .nr t[ 1    \" journal
  194. .    el            .nr t[ 5    \" conference paper
  195. .\}
  196. .el .ie !"\\*([B"" .nr t[ 3    \" article in book
  197. .el .ie !"\\*([R"" .nr t[ 4    \" technical report
  198. .el .ie !"\\*([I"" .nr t[ 2    \" book
  199. .el                .nr t[ 0    \" other
  200. .\\n(t[[
  201. ..
  202. .de 0[   \" other
  203. .s[
  204. .if !"\\*([A"" \\*([A,
  205. .if !"\\*([T"" \\*([T,
  206. .if !"\\*([O"" \\*([O\c
  207. .if !"\\*([D"" , \\*([D\c
  208. \&.
  209. .e[
  210. ..
  211. .de 1[ \" journal article
  212. .s[
  213. .if !"\\*([A"" \\*([A,
  214. .if !"\\*([T"" \\*([T,
  215. \\fI\\*([J \\*([V\\fP,
  216. .if !"\\*([N"" \\*([N
  217. .if !"\\*([D"" (\\*([D),
  218. .if !"\\*([P"" \\*([P\c
  219. .if !"\\*([I"" , \\*([I\c
  220. \\&.
  221. .if !"\\*([O"" \\*([O.
  222. .e[
  223. ..
  224. .de 2[ \" book
  225. .s[
  226. .ie !"\\*([A"" \\*([A,
  227. .el .if !"\\*([E"" \{\
  228. .       ie \\n([E-1 \\*([E, eds.,
  229. .       el \\*([E, ed.,\}
  230. .if !"\\*([T"" \\fI\\*([T\\fP,
  231. .rm a[
  232. .if !"\\*([I"" .ds a[ \\*([I
  233. .if !"\\*([C"" \{\
  234. .       if !"\\*(a["" .as a[ , \\&
  235. .       as a[ \\*([C\}
  236. .if !"\\*([D"" \{\
  237. .       if !"\\*(a["" .as a[ , \\&
  238. .       as a[ \\*([D\}
  239. \\*(a[.
  240. .if !"\\*([G"" Gov. ordering no. \\*([G.
  241. .if !"\\*([O"" \\*([O.
  242. .e[
  243. ..
  244. .de 3[ \" article in book
  245. .s[
  246. .if !"\\*([A"" \\*([A,
  247. .if !"\\*([T"" \\*([T,
  248. in \\fI\\*([B\\fP,
  249. .if !"\\*([V"" vol. \\*([V,
  250. .if !"\\*([E"" \\*([E (ed.),
  251. .if !"\\*([I"" \\*([I,
  252. .if !"\\*([C"" \\*([C,
  253. .if !"\\*([D"" \\*([D\c
  254. .if !"\\*([P"" , \\*([P\c
  255. \\&.
  256. .if !"\\*([O"" \\*([O.
  257. .e[
  258. ..
  259. .de 4[ \" report
  260. .s[
  261. .if !"\\*([A"" \\*([A,
  262. \\*([T,
  263. \\*([R\c
  264. .if !"\\*([G"" \& (\\*([G)\c
  265. .if !"\\*([I"" , \\*([I\c
  266. .if !"\\*([C"" , \\*([C\c
  267. .if !"\\*([D"" , \\*([D\c
  268. \\&.
  269. .if !"\\*([O"" , \\*([O.
  270. .e[
  271. ..
  272. .de 5[ \" conference paper
  273. .s[
  274. .if !"\\*([A"" \\*([A,
  275. .if !"\\*([T"" \\*([T,
  276. \\fI\\*([J\\fP,
  277. .if !"\\*([C"" \\*([C\c
  278. .if !"\\*([D"" , \\*([D\c
  279. .if !"\\*([P"" , \\*([P\c
  280. \\&.
  281. .if !"\\*([O"" , \\*([O.
  282. .e[
  283. ..
  284. .de [-   \" clean up after yourself
  285. .rm [A [B [C [D
  286. .rm [E [F [G
  287. .rm [I [J [K
  288. .rm [N [O [P
  289. .rm [R [T
  290. .rm [V [W
  291. ..
  292. .if t \{ \
  293. .pl 29.7c    \" page length
  294. .po 2.5c    \" page offset (left margin)
  295. .ll 16.5c    \" line length
  296. .lt 16.5c    \" title length
  297. .nr LL 16.5c
  298. .nr )l 29.7c
  299. .nr hm 2c
  300. .nr $r 9    \" factor for vertical spacing
  301. .nr $R \n($r
  302. .sz 12        \" font size
  303. .nr pp 12
  304. .nr sp 12
  305. .nr tp 12
  306. .nr fp 10
  307. .hc ~        \" hyphenation character
  308. .        \" Umlauts and sharp s
  309. .ds A \(A:
  310. .ds O \(O:
  311. .ds U \(U:
  312. .ds a \(a:
  313. .ds o \(o:
  314. .ds u \(u:
  315. .ds s \(ss
  316. .        \"  UMLAUT  \*:u, etc.
  317. .ds : \v'-0.6m'\h'(1u-(\\n(.fu%2u))*0.13m+0.06m'\z.\h'0.2m'\z.\h'-((1u-(\\n(.fu%2u))*0.13m+0.26m)'\v'0.6m'
  318. .\}
  319. .if n \{ \
  320. .po 0        \" page offset (left margin)
  321. .ll 78        \" line length
  322. .lt 78        \" title length
  323. .nr $r 4    \" factor for vertical spacing
  324. .nr $R \n($r
  325. .hc ~        \" hyphenation character
  326. .        \" Umlaute und scharfes s
  327. .ds A Ae
  328. .ds O Oe
  329. .ds U Ue
  330. .ds a ae
  331. .ds o oe
  332. .ds u ue
  333. .ds s sz
  334. .\}
  335. .de _
  336. \&\\$1\l'|0\(ul'\\$2
  337. ..
  338. .de FT        \" font for programs
  339. .ft C
  340. .sz -2
  341. ..
  342. .de FR
  343. .ft R
  344. .sz +2
  345. ..
  346. .de []        \" start to display collected references
  347. .uh References
  348. .lp
  349. ..
  350. .de $0        \" collect table of contents
  351. .(x
  352. .ta 2c
  353. .ie '\\$2''    \\$1
  354. .el \\$2.    \\$1
  355. .)x
  356. ..
  357. .de np
  358. .nr $p +1
  359. .ip \\n($p.
  360. ..
  361. .de SH
  362. .sp 0.5
  363. .in -3
  364. .r \\$1
  365. .sp 0.5
  366. .in +3
  367. ..
  368. .de PP
  369. .sp 0.5
  370. ..
  371. .de IP
  372. .ip \\$1 \\$2
  373. ..
  374. .de I
  375. .i \\$1
  376. ..
  377. .de TH
  378. ..
  379. .EQ
  380. gsize 12
  381. gfont R
  382. delim $$
  383. .EN
  384. .hc ~
  385. .ds ], , 
  386. .b " "
  387. .sp 1c
  388. .ta 9c
  389. .ft R
  390. .sz 12
  391. \l'17.1c'
  392. .nf
  393.  
  394.  
  395.     Object-Oriented
  396.     Attribute Grammars
  397.  
  398.     J. Grosch
  399.  
  400.  
  401. \l'17.1c'
  402. .sp 12.5c
  403. \l'17.1c'
  404. .ft H
  405. .nf
  406.     GESELLSCHAFT F\*UR MATHEMATIK
  407.     UND DATENVERARBEITUNG MBH
  408.  
  409.     FORSCHUNGSSTELLE F\*UR
  410.     PROGRAMMSTRUKTUREN
  411.     AN DER UNIVERSIT\*AT KARLSRUHE
  412. .r
  413. \l'17.1c'
  414. .bp
  415. .oh '''%'
  416. .eh '''%'
  417. .ce 99
  418. .sz 20
  419. .b " "
  420. .sp 2
  421. Project
  422. .sp
  423. .b "Compiler Generation"
  424. .sp
  425. .sz 12
  426. \l'15c'
  427. .sp
  428. .sz 16
  429. .b "Object-Oriented Attribute Grammars"
  430. .sp 2
  431. Josef Grosch
  432. .sp 2
  433. .sz 14
  434. Aug. 27, 1990
  435. .sp
  436. .sz 12
  437. \l'15c'
  438. .sp 2
  439. Report No. 23
  440. .sp 2
  441. Copyright \(co 1990 GMD
  442. .sp 2
  443. Gesellschaft f\*ur Mathematik und Datenverarbeitung mbH
  444. Forschungsstelle an der Universit\*at Karlsruhe
  445. Vincenz-Prie\*snitz-Str. 1
  446. D-7500 Karlsruhe
  447. .ce 0
  448. .fi
  449. .bp 1
  450. .ce 99
  451. .b "Object-Oriented Attribute Grammars"
  452. .sp 2
  453. Josef Grosch
  454. GMD Forschungsstelle an der Universit\*at Karlsruhe
  455. Vincenz-Prie\*snitz-Str. 1, D-7500 Karlsruhe, Germany
  456. grosch@karlsruhe.gmd.de
  457. .ce 0
  458. .sp
  459. .uh Abstract
  460. .\" .pp
  461. This paper introduces object-oriented attribute grammars.
  462. These can be characterized as a notation for
  463. all classes of attribute grammars. Based on a subtype relation
  464. between grammar rules, inheritance of attributes and attribute computations
  465. are defined. With this approach, attributes local to grammar rules and the
  466. elimination of chain rules are possible without any special constructs.
  467. We present object-oriented attribute grammars by a formal definition and by a few typical
  468. examples. They are compared to the concepts of related areas. We conclude by sketching an
  469. implementation of object-oriented attribute grammars as specification language of an
  470. attribute evaluator generator called
  471. .i Ag
  472. which processes ordered attribute grammars (OAGs) and higher order
  473. attribute grammars (HAGs). A first realistic application showed that the
  474. generated attribute evaluators are very efficient and can be used in
  475. production quality systems.
  476. .sh 1 Introduction
  477. .pp
  478. This paper defines a notation for attribute grammars called object-oriented
  479. attribute grammars. The notation can be used to describe concrete syntax,
  480. abstract syntax, and attribute grammars in a uniform way.
  481. Our original research goal was to promote the acceptance of attribute
  482. grammars by improving the specification language and by
  483. generating evaluators that are as efficient as possible.
  484. .pp
  485. Many existing attribute grammar systems\*([<\*([[DJL88\*(]]\*(>]
  486. are based on the concrete syntax of the source language.
  487. It has several advantages to base attribute
  488. grammars on the abstract syntax, however. Most of the terminal symbols and chain rules
  489. disappear. This makes the specification shorter and clearer. The abstract syntax can be
  490. optimized towards the task of semantic analysis. Usually, this leads to fewer
  491. grammar rules, fewer attribute computations, and fewer nodes in the structure tree.
  492. The result is a simplification of the attribute grammar as well as a reduction of space
  493. and run time because less nodes have to be stored and visited during attribute evaluation.
  494. Therefore efficiency is increased.
  495. In this paper we assume that attribute evaluation is performed on the basis of an attributed
  496. tree which is stored in memory.
  497. .pp
  498. The roots for our definition of object-oriented attribute grammars can already be found in the
  499. implementation of current attribute grammar systems. In attribute grammars, nonterminals
  500. can be associated
  501. with a set of attributes. There may be several grammar rules having this nonterminal as
  502. left-hand side symbol. The implementation of attributed trees uses a separate node type for
  503. every grammar rule. Now all node types for one nonterminal have to store the attributes of
  504. this nonterminal. This leads to the inheritance of information from a nonterminal to the
  505. associated rules.
  506. Object-oriented attribute grammars generalize this observation. Besides attributes, right-hand
  507. sides and attribute computations can be inherited as well. Inheritance is extended from one
  508. level (from nonterminals to rules) to arbitrary many levels. Attributes local to a rule can
  509. be introduced without any special construct.
  510. .pp
  511. The rest of this paper is organized as follows:
  512. The next section defines object-oriented attribute grammars formally.
  513. Section 3 presents examples of object-oriented attribute grammars using the specification
  514. language of an attribute grammar system.
  515. Section 4 compares object-oriented attribute grammars to the concepts of conventional
  516. attribute grammars, trees, types, and object-oriented programming.
  517. Section 5 shortly sketches an implementation of object-oriented attribute grammars and reports
  518. early experiences from a non-trivial application project.
  519. .sh 1 "Definition"
  520. .pp
  521. This section defines the principles of object-oriented attribute grammars.
  522. As starting point we shortly recall the traditional definition of attribute grammars
  523. \*([[Knu68\*(],Knu71\*(]].
  524. .pp
  525. An attribute grammar is an extension of a context-free grammar.
  526. A context-free grammar is denoted by G = (N, T, P, Z) where
  527. N is the set of nonterminals,
  528. T is the set of terminals,
  529. P is the set of productions, and
  530. Z \(mo N is the
  531. .i start
  532. symbol, which cannot appear on the right-hand side of any production in P.
  533. The set V = N \(cu T is called the vocabulary.
  534. Each production p \(mo P has the form $ p:~X~\(->~alpha $ where X \(mo N and
  535. $ alpha~\(mo~V sup "*" $.
  536. The relation \(:> (directly derives) is defined over strings in $ V sup "*" $ as follows:
  537. if $ p:~X~\(->~alpha $, p \(mo P, $ nu X omega~\(mo~V sup "*" $,
  538. $ nu alpha omega~\(mo~V sup "*" $ then
  539. $ nu X omega~\(:>~nu alpha omega $.
  540. The relation $ \(:> sup "*" $ is the transitive and reflexive closure of \(:>.
  541. The language L(G) is defined as $ L(G)~=~"{"~w~|~Z~\(:> sup *~w~"}" $.
  542. .pp
  543. An attribute grammar augments a context-free grammar by attributes and attribute
  544. computations. A set of attributes is associated with each symbol in V. Attribute computations
  545. are added to each production describing how to compute attribute values.
  546. This simple view of attribute grammars shall suffice for the scope of this paper.
  547. .pp
  548. In general there can be several productions having the same nonterminal on the left-hand side.
  549. This allows for different derivations starting from one nonterminal. In object-oriented
  550. attribute grammars, one production is permitted for one left-hand side symbol, only. This way
  551. the notions production and nonterminal (vocabulary respectively) become the same and are
  552. called
  553. .i "node type"
  554. in the following. Several different derivations are made possible through the newly introduced
  555. subtype relation.
  556. .pp
  557. An object-oriented attribute grammar is formally denoted by G = (N, T, A, C, Z) where
  558. N is the set of nonterminals,
  559. T is the set of terminals,
  560. A is the set of attributes,
  561. C is the set of attribute computations, and
  562. Z is the start symbol (Z \(mo N).
  563. The set NT = N \(cu T is called the set of
  564. .i "node types" .
  565. Each element n \(mo NT is associated with a tuple n: (R, B, D, S) where
  566. $ R~\(mo~NT sup "*" $ is the right-hand side,
  567. $ B~\(mo~A sup "*" $ is the set of attributes,
  568. $ D~\(mo~C sup "*" $ is the set of attribute computations, and
  569. S \(mo NT is the base type.
  570. .pp
  571. The elements of NT induce a relation \(ib (subtype) over NT as follows:
  572. if $ n:~( alpha ,~beta ,~delta ,~m )~\(mo~NT $ then n \(ib m.
  573. m is called
  574. .i base
  575. or
  576. .i super
  577. type, n is called
  578. .i derived
  579. type or
  580. .i subtype .
  581. The relation \(ib is transitive:
  582. if n \(ib m and m \(ib o then n \(ib o.
  583. .pp
  584. The relation \(:> (directly derives) is defined here only for the context-free part of an
  585. object-oriented attribute grammar. There are two possibilities for derivations which are 
  586. defined over strings in $ NT sup "*" $ as follows:
  587. .lp
  588. .nf
  589. .ta 3.9c
  590.       if $ nu n sub i omega~\(mo~NT sup "*" $ and    $ n sub 1 :~( alpha sub 1 ,~beta sub 1 ,~delta sub 1 ,~n sub 0 )~\(mo~NT, $
  591.     $ n sub 2 :~( alpha sub 2 ,~beta sub 2 ,~delta sub 2 ,~n sub 1 )~\(mo~NT, $
  592.                 $ ... $
  593.     $ n sub i :~( alpha sub i ,~beta sub i ,~delta sub i ,~n sub i-1 )~\(mo~NT $ then $ nu n sub i omega~\(:>~nu alpha sub 1 alpha sub 2 ... alpha sub i omega $.
  594. .lp
  595. .nf
  596.       if $ nu n omega~\(mo~NT sup "*" $ and $ m~\(ib~n $ then $ nu n omega~\(:>~nu m omega $.
  597. .lp
  598. We assume the existence of a predefined node type $ n sub 0 :~(\(o/,~\(o/,~\(o/,~-) $ with
  599. empty components. In a direct derivation step, a node type can be replaced by its right-hand
  600. side $ ( alpha sub 1 ... alpha sub i ) $ or by one of its subtypes (m). All replacing
  601. right-hand sides are the union of right-hand sides according to the subtype hierarchy.
  602. The relation $ \(:> sup "*" $ is the transitive and reflexive closure of \(:>.
  603. The language L(G) is defined as $ L(G)~=~"{"~w~|~Z~\(:> sup "*"~w~"}" $.
  604. .pp
  605. The subtype relation has the following properties: a derived node type inherits the
  606. right-hand side, the attributes, and the attribute computations from its base type. As
  607. consequence of the transitive nature of this relation, a derived type inherits all the
  608. components from all base types according to the subtype hierarchy.
  609. It may extend the set of inherited items by defining
  610. additional right-hand side elements, attributes, or attribute computations. All accumulated
  611. right-hand side elements and attributes must be distinct because they are
  612. united. An attribute computation for an attribute may overwrite an inherited one.
  613. The definition of the subtype relation allows exactly single inheritance.
  614. .sh 1 Examples
  615. .pp
  616. We implemented an attribute grammar system called
  617. .i Ag
  618. based on object-oriented attribute grammars\*([<\*([[GrE90\*(]]\*(>]. The following
  619. examples of object-oriented attribute grammars are given in the specification language of
  620. .i Ag .
  621. The language tries to adhere to the conventional style of grammars as far as possible.
  622. It offers far more features for practical usage than can be explained here. The interested
  623. reader is referred to the user's manual\*([<\*([[Gro89b\*(]]\*(>].
  624. .(b
  625. Example 1:
  626. .sp 0.5
  627. .FT
  628. Expr        = <
  629.    Add      = Lop: Expr '+' Rop: Expr .
  630.    Sub      = Lop: Expr '-' Rop: Expr .
  631.    Const    = Integer .
  632. > .
  633. Integer     : .
  634. \&'+'         : .
  635. \&'-'         : .
  636. .)b
  637. .pp
  638. Example 1 describes the concrete syntax of primitive expressions. It defines four nonterminal
  639. node types (Expr, Add, Sub, and Const) and 3 terminal node types (Integer, '+', and '-').
  640. The distinction between nonterminals and terminals is based on the characters '=' and ':'.
  641. Terminal node types without attributes do not have to be defined explicitly because
  642. undefined node types are defined implicitly as terminals. Node types can be named by
  643. identifiers or strings. In this example only the right-hand side components and the subtype
  644. relation are used - attributes and attribute computations do not appear. Expr has zero, Add
  645. and Sub have three, and Const has one right-hand side element(s) or children. A child consists
  646. of a selector name and node type. Selector names are added to allow unambiguous access to
  647. children. Missing selector names are implicitly defined  to be equal to the name of the node
  648. type. The children of the node type Add have the selector names Lop, '+', and Rop.
  649. Their node types are Expr, '+', and Expr. The node type Const has one child with
  650. the selector name Integer of type Integer.
  651. The subtype relation is expressed by enclosing all subtypes of a base type in < > brackets.
  652. In Example 1 the subtype relation is:
  653. Add \(ib Expr, Sub \(ib Expr, Const \(ib Expr.
  654. .(b
  655. Example 2:
  656. .sp 0.5
  657. .FT
  658. Expr        = [Value: INTEGER]        { Value := 0; } <
  659.    Add      = Lop: Expr '+' Rop: Expr { Value := Lop:Value + Rop:Value; } .
  660.    Sub      = Lop: Expr '+' Rop: Expr { Value := Lop:Value - Rop:Value; } .
  661.    Const    = Integer                 { Value := Integer:Value; } .
  662.    Zero     = .
  663. > .
  664. Integer     : [Value: INTEGER] .
  665. .)b
  666. .pp
  667. Example 2 adds attributes and attribute computations to Example 1 and describes the
  668. evaluation of expressions. Attribute definitions are in enclosed in [ ] brackets. Similarly
  669. to children, attributes are characterized by a selector name and a certain type. The
  670. attribute types are given by names taken from the target language (here Modula-2).
  671. .pp
  672. The node types Expr and Integer define one attribute named Value of type INTEGER. The
  673. subtypes Add, Sub, Const, and Zero inherit the attribute Value from Expr. Attribute
  674. computations are mainly written as assignments of target language expressions to attributes
  675. and are enclosed in { } brackets. The attribute computations are expressed with respect to a
  676. current tree node and may contain so-called
  677. .i "attribute denotations" .
  678. At a tree node, the attributes of this node and the attributes of the
  679. children are accessible. Attributes of the current node or of the left-hand side of a
  680. rule are denoted just by their name.
  681. Attributes of a child or of the right-hand side of a rule are denoted by
  682. the child's selector name, a colon, and the attribute name.
  683. The subtype Zero inherits the computation of the attribute Value from the base type Expr,
  684. whereas the node types Add, Sub, and Const overwrite it with node type specific computations.
  685. The value for the attribute of the node type Integer has to be provided at the creation time
  686. of the syntax tree e. g. from a scanner and parser.
  687. .pp
  688. A node of a base type like
  689. .i Expr
  690. usually does not occur in an abstract syntax tree for a complete program.
  691. However, this node type can be used as placeholder for unexpanded
  692. nonterminals in incomplete programs which occur in applications like
  693. syntax directed editors.
  694. .(b
  695. Example 3:
  696. .sp 0.5
  697. .FT
  698. Stats       = <
  699.    NoStat   = .
  700.    OneStat  = Stats Stat .
  701. > .
  702. Stat        = [Pos: tPosition] <
  703.    If       = Expr Then: Stats Else: Stats .
  704.    While    = Expr Stats .
  705.    Call     = Actuals [Ident: tIdent] .
  706. > .
  707. .)b
  708. .(b
  709. Example 4:
  710. .sp 0.5
  711. .FT
  712. Stats       = <
  713.    NoStat   = .
  714.    Stat     = Next: Stats [Pos: tPosition] <
  715.       If    = Expr Then: Stats Else: Stats .
  716.       While = Expr Stats .
  717.       Call  = Actuals [Ident: tIdent] .
  718.    > .
  719. > .
  720. .)b
  721. .pp
  722. Examples 3 and 4 describe two possibilities for the specification of the abstract syntax of
  723. statement sequences. Both examples use two nonterminals to describe a sequence (Stats) and
  724. various
  725. statements (Stat). Whereas these nonterminals are independent in Example 3 they are related as
  726. subtypes in Example 4. Therefore Example 4 shows a non-trivial subtype relation of nesting
  727. depth two. The subtype relation is:
  728. NoStat \(ib Stats, Stat \(ib Stats, If \(ib Stat, While \(ib Stat, Call \(ib Stat.
  729. In Example 4 the node types If, While, and Call inherit the child Next of type Stats and the
  730. attribute Pos from the base type Stat. They add their own children and attributes (Call
  731. only). The big difference between the two solutions arises with regard to efficiency. Example
  732. 3 allocates in the structure tree two nodes per statement in a sequence. These nodes need
  733. space and have to be traversed (visited) during attribute evaluation. Example 4 allocates
  734. only one node per statement thus saving both, space and attribute evaluation time. The price
  735. is the additional child called Next in every node type for a statement. Nevertheless,
  736. it has to be defined only once because of the inheritance mechanism.
  737. .pp
  738. The node type Call uses a local attribute called Ident. There is no need for the description
  739. of a procedure call statement to have two children: the name of the procedure and the list of
  740. actual parameters. The name of the procedure can become a local attribute of the node type
  741. and therefore one child for the parameters suffices.
  742. .pp
  743. The specification of node types can be grouped into modules. This feature
  744. can be used to structure a specification or to extend an existing one. If a
  745. node type has already been declared the given children, attributes, attribute computations,
  746. and subtypes are added to the existing declaration.
  747. Otherwise a new node type is introduced.
  748. This way of modularization offers several possibilities:
  749. .ip -
  750. Context-free grammar and attribute declarations (= node types) as well as
  751. attribute computations can be combined in one module as in conventional,
  752. monolithic attribute grammars.
  753. .ip -
  754. The context-free grammar, the attribute declarations, and the
  755. attribute computations can be placed in three separate modules.
  756. .ip -
  757. The attribute computations can be subdivided into several modules according
  758. to the tasks of semantic analysis. For example, there would be modules for
  759. scope handling, type determination, and context conditions.
  760. .ip -
  761. The information can be grouped according to language concepts or
  762. nonterminals. For example, there would be modules containing
  763. the grammar rules, the attribute declarations, and the
  764. attribute computations for declarations, statements, and expressions.
  765. .lp
  766. .(b
  767. Example:
  768. .sp 0.5
  769. .FT
  770. MODULE my_version
  771. .sp 0.5
  772. Stats        = [Env: tEnv] <                    /* add attribute   */
  773.    While     = Init: Stats Terminate: Stats .   /* add children    */
  774.    Repeat    = Stats Expr .                     /* add node type   */
  775. > .
  776. .sp 0.5
  777. Zero         = { Value := 1; }                  /* add computation */
  778. .sp 0.5
  779. END my_version
  780. .)b
  781. .sh 1 Comparison
  782. .pp
  783. This section compares object-oriented attribute grammars as introduced in this paper with the
  784. well-known concepts of (attribute) grammars, tree and record types, type extensions, and
  785. object-oriented programming. These areas are related because of the following reasons:
  786. attribute grammars are usually based on context-free grammars. An attribute grammar
  787. specifies an evaluation of attributes of a tree defined by such a context-free grammar.
  788. Trees can be implemented using a set of record type declarations. Therefore
  789. context-free grammars, trees, and record types deal more or less with the
  790. same concept. Table 1 compares the most important notions from
  791. these areas. Additionally we included the notions from the area of
  792. object-oriented (oo) programming as described e. g. in
  793. \*([[Bla89\*(]].
  794. .(b L
  795. .sp 0.5
  796. .TS
  797. center;
  798. l | l | l | l.
  799. (attribute) grammars    trees    types    oo-programming
  800. _
  801. rule        node type    record type    class
  802. attribute    field in a node type    record field    instance variable
  803. nonterminal    set of node types    union of record types    -
  804. terminal    distinct node type    record type without    -
  805.            pointer fields
  806. rule application    tree node    record variable    object, instance
  807. attribute computation    -    procedure declaration    method
  808. -    -    procedure call    message
  809. -    -    base type    superclass
  810. -    -    derived type    subclass
  811. -    -    extension    inheritance
  812. .TE
  813. .sp 0.5
  814. .ce
  815. Table 1: Comparison of notions from the areas of grammars, trees, types, and oo-programming
  816. .)b
  817. .pp
  818. Object-oriented attribute grammars are missing in Table 1. For them we used the notions from
  819. attribute grammars and added the notions
  820. node type, base type, subtype or derived type, and inheritance from the other areas.
  821. .sh 2 "Attribute Grammars"
  822. .pp
  823. Conventional grammars in BNF allow several productions with the same nonterminal symbol on the
  824. left-hand side. A node type in object-oriented attribute grammars, which corresponds to a
  825. nonterminal as well as to a rule name, has exactly one right-hand side.
  826. The selector names can be regarded as syntactic sugar.
  827. To allow for several different derivations, a subtype relation between node types is added.
  828. During a derivation, a node type may be replaced
  829. by its right-hand side or by a subtype. Additionally, the subtype feature allows to express
  830. chain rules and single inheritance. Inheritance is a notation to factor out parts that are
  831. common to several node types such as right-hand sides, attributes, and attribute computations.
  832. Fortunately, attributes local to a rule (node type) are possible without any special construct.
  833. .pp
  834. Object-oriented attribute grammars are a notation to write BNF grammars in a short and
  835. concise way and where the underlying tree structure can be exactly described. With respect to
  836. attribute grammars the same notational advantages hold.
  837. Attribute grammars are a special case of object-oriented attribute grammars. They are
  838. characterized by a one level subtype hierarchy, right-hand sides and attribute computations
  839. are defined for subtypes only, and attributes are associated only with base types.
  840. In terms of attribute grammar classes
  841. or attribute grammar semantics object-oriented attribute grammars are equivalent to attribute
  842. grammars.
  843. .sh 2 "Trees and Records"
  844. .pp
  845. When trees are stored in memory, they can be represented by linked records. Every node type
  846. corresponds to a record type. Object-oriented attribute grammars directly describe the
  847. structure of attributed syntax trees. The node types can be seen as record types. The
  848. right-hand side elements resemble pointer valued fields describing the tree structure and the
  849. attributes are additional fields for arbitrary information stored at tree nodes. The field
  850. name and field type needed for record types are also present in the node types of
  851. object-oriented attribute grammars.
  852. .sh 2 "Type Extensions"
  853. .pp
  854. Type extensions have been introduced with the language
  855. Oberon by Wirth\*([<\*([[Wir88a\*(],Wir88b\*(],Wir88c\*(]]\*(>].
  856. They allow the definition of a record type based on an existing record type by adding record
  857. fields. This extension mechanism induces a subtype relation between record types. The 
  858. subtype and inheritance features are equivalent in object-oriented attribute grammars and type
  859. extensions with the difference that Wirth uses the word extension in place of inheritance.
  860. .sh 2 "Object-Oriented Programming"
  861. .pp
  862. The concepts of subtype and inheritance in object-oriented attribute grammars and
  863. object-oriented programming have many similarities
  864. and this explains the name object-oriented attribute grammars.
  865. The notions class, instance variable,
  866. object, superclass, and subclass have direct counter parts (see Table 1).
  867. There are also some differences.  Object-oriented programming allows an
  868. arbitrary number of named methods which are activated by explicitly sending
  869. messages. In object-oriented attribute grammars there is exactly one
  870. attribute computation (unnamed method) for an attribute. There is nothing
  871. like messages: the attribute computation for an attribute is activated
  872. implicitly and exactly once.
  873. .sh 1 Experiences
  874. .pp
  875. As already mentioned, we implemented an attribute evaluator generator called
  876. .i Ag
  877. which processes object-oriented attribute grammars. It accepts
  878. .i "ordered attribute grammars"
  879. (OAGs)\*([<\*([[Kas80\*(]]\*(>] and
  880. .i "higher order attribute grammars"
  881. (HAGs)\*([<\*([[VSK89\*(]]\*(>] which are a reinvention of
  882. .i "generative attribute grammars"
  883. \*([[Den84\*(]].
  884. .i Ag
  885. is written in Modula-2 and runs under UNIX. The sources for
  886. .i Ag
  887. also exist in C.
  888. Attribute evaluators in the target languages Modula-2 and C are supported.
  889. We tried to avoid the
  890. disadvantages of closed and complex systems. Instead, we had the goal of
  891. keeping everything as small, simple, open, powerful, efficient, practical
  892. usable, and language independent as possible.
  893. The specification language has a concise and clear concrete syntax to support compact
  894. attribute grammars which are easy to write and to read. The attribute grammars are oriented
  895. towards abstract syntax what is a great simplification
  896. in comparison to the use of concrete syntax. Readability of attribute
  897. grammars is furthermore supported by modules where the context-free grammar
  898. (abstract syntax) is specified only once in order to assure consistency.
  899. The attributes are typed using the types of the target language -
  900. tree-valued attributes are possible. The attribute computations are
  901. programmed in the target language and should be written in a functional
  902. style. External functions can be called and non-functional statements as
  903. well as side-effects are possible. These features make attribute grammars
  904. open and allow the attributed trees as well as the attribute evaluators to be
  905. implemented efficiently.
  906. .pp
  907. Using the target language for attribute computations makes the generator largely target
  908. language independent because there is no need to analyze a special language
  909. for attribute computations and to generate code for it. This job is already
  910. performed by usual compilers. Therefore
  911. .i Ag
  912. is a relatively small and simple program which concentrates on the analysis
  913. of object-oriented attribute grammars and attribute dependencies.
  914. It generates evaluators for (OAGs) and (HAGs).
  915. The generated attribute evaluators are very efficient because
  916. they are directly coded using recursive procedures.
  917. .pp
  918. A large application of object-oriented attribute grammars and
  919. .i Ag
  920. was the generation of the semantic analysis phase of a Modula-2 to C
  921. translator\*([<\*([[Mar90\*(]]\*(>]. The program called
  922. .i Mtc
  923. translates Modula-2 programs into readable C code without any restrictions
  924. (even nested procedures and modules).
  925. This program was largely generated using our compiler construction tool box
  926. \*([[GrE90\*(]]. Table 2 gives
  927. the sizes of the specifications and the generated source modules.
  928. .(b L
  929. .sp 0.5
  930. .TS
  931. center box;
  932. l | c s s | c s s | c1 s
  933. l | l l l | l l l | l1 l
  934. l | n n n | n n n | l1 l
  935. .
  936. part    specification    source module    tool
  937. _
  938.     formal    code    total    def.    impl.    total    name    references
  939. _
  940. scanner     392    133    525    56    1320    1376    Rex    \*([[Gro87b\*(],Gro88\*(]]
  941. parser      951    88    1039    81    3007    3088    Ell    \*([[Gro88\*(],GrV88\*(]]
  942. tree        189    51    240    579    2992    3571    Ast    \*([[Gro89a\*(]]
  943. symbol table       115    938    1053    413    1475    1888    Ast    \*([[Gro89a\*(]]
  944. semantics    1886    151    2037    9    3288    3297    Ag    \*([[Gro89b\*(]]
  945. code generator    2793    969    3762    47    7309    7356    Estra    \*([[Vie89\*(]]
  946. reusable parts    -    -    -    819    2722    3541    Reuse    \*([[Gro87a\*(]]
  947. miscellaneous    -    -    -    698    3153    3851
  948. _
  949. total       6326    2330    8656    2702    25266    27968
  950. .TE
  951. .sp 0.5
  952. .ce
  953. Table 2: Sizes of the specifications and source modules of \fIMtc
  954. .)b
  955. .pp
  956. The binary program comprises 301,240 bytes.
  957. It runs at a speed of 810 tokens per second or 167 lines per second on a SUN
  958. workstation (MC 68020 processor). These figures are computed by taking only
  959. the size of the translated modules into account. If we include the definition
  960. modules which are imported transitively and which are scanned, parsed, and
  961. analyzed as well, we arrive at 1320 tokens per second
  962. or 418 lines per second. In comparison, the compilers supplied by the
  963. manufacturer run at a speed of 97 lines per second (excluding header files)
  964. or 163 lines per second (including header files) in the case of C
  965. and 48 lines per second in the case of Modula-2. The run time of
  966. .i Mtc
  967. is distributed as follows:
  968. .(b
  969. .TS
  970. center;
  971. l l.
  972. scanning + parsing + tree construction    42 %
  973. semantic analysis    33 %
  974. code generation     25 %
  975. .TE
  976. .)b
  977. The semantic analysis spends 95 % in attribute computations using user
  978. supplied code and 5 % in tree traversal or visit actions respectively.
  979. By the way, there are up to five visits to 11 node types.
  980. .pp
  981. .i Mtc
  982. uses approximately 360 K Bytes dynamic memory per 1000 source lines to store
  983. the abstract syntax tree, the attributes, and the symbol table without optimization of
  984. attribute storage. Another 600 K Bytes are used by the transformer generated with
  985. .i Estra .
  986. This is bearable with today's memory capacities.
  987. Contrary to the literature this shows that it is
  988. possible to store all attributes in the tree. We even do this for the
  989. environment attribute. This becomes possible by implementing the symbol
  990. table as an abstract data type in the target language. The implementation is
  991. time and space efficient by taking advantage of pointer semantics and
  992. structure sharing.
  993. .pp
  994. These results demonstrate the time efficiency of the generated attribute
  995. evaluators in the semantic analysis of non-trivial languages like Modula-2.
  996. The performance makes (object-oriented) attribute grammars and
  997. .i Ag
  998. usable for production quality systems.
  999. .sh 1 Summary
  1000. .pp
  1001. We introduced object-oriented attribute grammars as a common notation for concrete syntax,
  1002. abstract syntax, and attribute grammars. The subtype and inheritance features represent a
  1003. shorthand notation for attribute grammars. The advantages of object-oriented attribute
  1004. grammars become primarily apparent when used in practice as specification language for
  1005. an attribute grammar system.
  1006. They allow the exact description of the underlying tree structure in order to create compact
  1007. and storage efficient trees. Right-hand side elements, attributes, and attribute computations
  1008. common to several rules can be factored out. They allow the expression of chain rules and the
  1009. definition of attributes local to rules.
  1010. We compared object-oriented attribute grammars to similar concepts such as conventional
  1011. attribute grammars, trees, types, and object-oriented programming.
  1012. An attribute evaluator generator system for object-oriented attribute grammars has been
  1013. implemented.
  1014. The generated attribute evaluators are very efficient especially in terms of run time.
  1015. We reported early experiences from a non-trivial application which are quite satisfying.
  1016. .fi
  1017. .sz 12
  1018. .[]
  1019. .[-
  1020. .ds [F Bla89
  1021. .ds [A G\*(p] Blaschek
  1022. .ds [T Implementation of Objects in Modula-2
  1023. .nr [P 1
  1024. .ds [P 147-155
  1025. .ds [J Structured Programming
  1026. .ds [V 10
  1027. .ds [N 3
  1028. .ds [D 1989
  1029. .][
  1030. .[-
  1031. .ds [F Den84
  1032. .ds [A P\*(p] Dencker
  1033. .ds [T Generative attributierte Grammatiken
  1034. .ds [R Dissertation
  1035. .ds [I Universit\\*:at Karlsruhe
  1036. .ds [D 1984
  1037. .][
  1038. .[-
  1039. .ds [F DJL88
  1040. .ds [A P\*(p] Deransart
  1041. .as [A \*(c]M\*(p] Jourdan
  1042. .as [A \*(m]B\*(p] Lorho
  1043. .ds [T Attribute Grammars - Definitions, Systems and Bibliography
  1044. .ds [V 323
  1045. .ds [J LNCS
  1046. .ds [C Berlin
  1047. .ds [I Springer Verlag
  1048. .ds [D 1988
  1049. .][
  1050. .[-
  1051. .ds [F Gro87a
  1052. .ds [A J\*(p] Grosch
  1053. .ds [T Reusable Software - A Collection of Modula-Modules
  1054. .ds [I GMD Forschungsstelle an der Universit\\*:at Karlsruhe
  1055. .ds [R Compiler Generation Report No. 4
  1056. .ds [N 4
  1057. .ds [D Sep. 1987
  1058. .][
  1059. .[-
  1060. .ds [F Gro87b
  1061. .ds [A J\*(p] Grosch
  1062. .ds [T Rex - A Scanner Generator
  1063. .ds [I GMD Forschungsstelle an der Universit\\*:at Karlsruhe
  1064. .ds [R Compiler Generation Report No. 5
  1065. .ds [N 5
  1066. .ds [D Dec. 1987
  1067. .][
  1068. .[-
  1069. .ds [F Gro88
  1070. .ds [A J\*(p] Grosch
  1071. .ds [T Generators for High-Speed Front-Ends
  1072. .ds [V 371
  1073. .ds [J LNCS
  1074. .ds [C Berlin
  1075. .ds [I Springer Verlag
  1076. .nr [P 1
  1077. .ds [P 81-92
  1078. .ds [D Oct. 1988
  1079. .][
  1080. .[-
  1081. .ds [F GrV88
  1082. .ds [A J\*(p] Grosch
  1083. .as [A \*(n]B\*(p] Vielsack
  1084. .ds [T The Parser Generators Lalr and Ell
  1085. .ds [I GMD Forschungsstelle an der Universit\\*:at Karlsruhe
  1086. .ds [R Compiler Generation Report No. 8
  1087. .ds [N 8
  1088. .ds [D Apr. 1988
  1089. .][
  1090. .[-
  1091. .ds [F Gro89a
  1092. .ds [A J\*(p] Grosch
  1093. .ds [T Ast - A Generator for Abstract Syntax Trees (Revised Version)
  1094. .ds [I GMD Forschungsstelle an der Universit\\*:at Karlsruhe
  1095. .ds [R Compiler Generation Report No. 15
  1096. .ds [N 15
  1097. .ds [D Aug. 1989
  1098. .][
  1099. .[-
  1100. .ds [F Gro89b
  1101. .ds [A J\*(p] Grosch
  1102. .ds [T Ag - An Attribute Evaluator Generator
  1103. .ds [I GMD Forschungsstelle an der Universit\\*:at Karlsruhe
  1104. .ds [R Compiler Generation Report No. 16
  1105. .ds [N 16
  1106. .ds [D Aug. 1989
  1107. .][
  1108. .[-
  1109. .ds [F GrE90
  1110. .ds [A J\*(p] Grosch
  1111. .as [A \*(n]H\*(p] Emmelmann
  1112. .ds [T A Tool Box for Compiler Construction
  1113. .ds [V 477
  1114. .ds [J LNCS
  1115. .ds [C Berlin
  1116. .ds [I Springer Verlag
  1117. .nr [P 1
  1118. .ds [P 106-116
  1119. .ds [D Oct. 1990
  1120. .][
  1121. .[-
  1122. .ds [F Kas80
  1123. .ds [A U\*(p] Kastens
  1124. .ds [T Ordered Attribute Grammars
  1125. .nr [P 1
  1126. .ds [P 229-256
  1127. .ds [J Acta Inf.
  1128. .ds [V 13
  1129. .ds [D 1980
  1130. .ds [N 3
  1131. .][
  1132. .[-
  1133. .ds [F Knu68
  1134. .ds [A D\*(p]\*(a]E\*(p] Knuth
  1135. .ds [T Semantics of Context-Free Languages
  1136. .nr [P 1
  1137. .ds [P 127-146
  1138. .ds [J Mathematical Systems Theory
  1139. .ds [V 2
  1140. .ds [D June 1968
  1141. .ds [N 2
  1142. .][
  1143. .[-
  1144. .ds [F Knu71
  1145. .ds [A D\*(p]\*(a]E\*(p] Knuth
  1146. .ds [T Semantics of Context-free Languages: Correction
  1147. .nr [P 1
  1148. .ds [P 95-96
  1149. .ds [J Mathematical Systems Theory
  1150. .ds [V 5
  1151. .ds [D Mar. 1971
  1152. .][
  1153. .[-
  1154. .ds [F Mar90
  1155. .ds [A M\*(p] Martin
  1156. .ds [T Entwurf und Implementierung eines \\*:Ubersetzers von Modula-2 nach C
  1157. .ds [R Diplomarbeit
  1158. .ds [I GMD Forschungsstelle an der Universit\\*:at Karlsruhe
  1159. .ds [D Feb. 1990
  1160. .][
  1161. .[-
  1162. .ds [F Vie89
  1163. .ds [A B\*(p] Vielsack
  1164. .ds [T Spezifikation und Implementierung der Transformation attributierter B\\*:aume
  1165. .ds [R Diplomarbeit
  1166. .ds [I GMD Forschungsstelle an der Universit\\*:at Karlsruhe
  1167. .ds [D June 1989
  1168. .][
  1169. .[-
  1170. .ds [F VSK89
  1171. .ds [A H\*(p]\*(a]H\*(p] Vogt
  1172. .as [A \*(c]S\*(p]\*(a]D\*(p] Swierstra
  1173. .as [A \*(m]M\*(p]\*(a]F\*(p] Kuiper
  1174. .ds [T Higher Order Attribute Grammars
  1175. .ds [J SI\&GPLAN Notices
  1176. .ds [V 24
  1177. .ds [N 7
  1178. .nr [P 1
  1179. .ds [P 131-145
  1180. .ds [D July 1989
  1181. .][
  1182. .[-
  1183. .ds [F Wir88a
  1184. .ds [A N\*(p] Wirth
  1185. .ds [T Type Extensions
  1186. .ds [J ACM Trans. Prog. Lang. and Systems
  1187. .ds [V 10
  1188. .ds [N 2
  1189. .ds [D Apr. 1988
  1190. .nr [P 1
  1191. .ds [P 204-214
  1192. .][
  1193. .[-
  1194. .ds [F Wir88b
  1195. .ds [A N\*(p] Wirth
  1196. .ds [T The Programming Language Oberon
  1197. .ds [J Software\(emPractice & Experience
  1198. .ds [V 18
  1199. .ds [N 7
  1200. .ds [D July 1988
  1201. .nr [P 1
  1202. .ds [P 671-690
  1203. .][
  1204. .[-
  1205. .ds [F Wir88c
  1206. .ds [A N\*(p] Wirth
  1207. .ds [T From Modula to Oberon
  1208. .ds [J Software\(emPractice & Experience
  1209. .ds [V 18
  1210. .ds [N 7
  1211. .ds [D July 1988
  1212. .nr [P 1
  1213. .ds [P 661-670
  1214. .][
  1215. .bp 1
  1216. .lp
  1217. .b Contents
  1218. .sp
  1219. .xp
  1220.